package com.relytosoft.mizar.media.display.api.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * 视图明细类
 *
 * @author hj
 * @version 1.0
 * @date 2022/4/24 9:39
 * @ClassName ViewDetail
 */
@TableName("VID_VIEW_DETAIL")
@ApiModel("ViewDetail")
public class ViewDetail implements Serializable {

    private static final long serialVersionUID = -3190190239880499281L;

    /**
     * 主键
     */
    @TableId(value="ID", type= IdType.AUTO)
    @ApiModelProperty(value = "主键ID", required = true)
    @NotBlank(message = "主键ID不能为空")
    private Integer id;

    /**
     * 视图ID
     */
    @ApiModelProperty(value = "视图ID", required = true)
    @TableField("FORM_ID")
    @NotBlank(message = "视图ID不能为空")
    private Integer formId;

    /**
     * 通道ID
     */
    @ApiModelProperty(value = "通道ID", required = true)
    @TableField("CHANNEL_ID")
    @NotBlank(message = "通道ID不能为空")
    private Integer channelId;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序", required = true)
    @TableField(value = "SORT")
    @NotBlank(message = "排序不能为空")
    private Integer sort;

    public ViewDetail() {
    }

    public ViewDetail(Integer formId, Integer channelId, Integer sort) {
        this.formId = formId;
        this.channelId = channelId;
        this.sort = sort;
    }

    public ViewDetail(Integer id, Integer formId, Integer channelId, Integer sort) {
        this.id = id;
        this.formId = formId;
        this.channelId = channelId;
        this.sort = sort;
    }

    /**
     * 获得主键ID
     */
    public Integer getId(){
        return this.id;
    }
    /**
     * 设置主键ID
     */
    public void setId(Integer id){
        this.id = id;
    }

    /**
     * 获得视图ID
     */
    public Integer getFormId(){
        return this.formId;
    }
    /**
     * 设置视图ID
     */
    public void setFormId(Integer formId){
        this.formId = formId;
    }

    /**
     * 获得通道ID
     */
    public Integer getChannelId(){
        return this.channelId;
    }
    /**
     * 设置通道ID
     */
    public void setChannelId(Integer channelId){
        this.channelId = channelId;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    @Override
    public String toString() {
        return "ViewDetail{" +
                "id=" + id +
                ", formId=" + formId +
                ", channelId=" + channelId +
                ", sort=" + sort +
                '}';
    }
}
